﻿namespace LevelEditors
{
    using System;
    using UnityEngine;
    using UnityEngine.UI;

    [RequireComponent(typeof(Button))]
    public class UISwitchActiveButton : MonoBehaviour
    {
        public GameObject target;

        private void Awake()
        {
            base.GetComponent<Button>().onClick.AddListener(() => this.target.SetActive(!this.target.activeSelf));
        }
    }
}

